package cn.itcast.mapper;

import cn.itcast.pojo.OperateLog;
import cn.itcast.pojo.QueryString;
import cn.itcast.pojo.QuerysString;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LogMapper {
    /**
     * 添加操作日志
     * @param operateLog
     */
    @Insert("insert into operation_log values (null,#{operateEmpId},#{operateTime},#{className},#{methodName},#{methodParams},#{returnValue},#{costTime},#{operateEmpName})")
    void insertLog(OperateLog operateLog);

    /**
     * 分页查询操作日志
     * @return
     */
    @Select("select * from operation_log")
    List<OperateLog> page();

}
